package com.vhall.component.controller.rbac.inner;


import com.vhall.component.entity.rbac.vo.MenuesVO;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.service.rbac.RbacRoleMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author dalong
 * @date 2021-05-12 21:06
 */
@Api(tags = "RbacMenuesInnerController", value = "菜单")
@Slf4j
@VhallComponent
public class RbacMenuesInnerController implements RbacMenuesInnerFacade {

    @Autowired
    private RbacRoleMenuService roleMenuService;

    @ApiOperation("按角色获取菜单列表")
    @Override
    public List<MenuesVO> getListByRoleId(@RequestParam("role_id") Integer roleId) {
        return roleMenuService.getListByRoleId(roleId);
    }

}
